package com.coffee.daili.service.dao;

import com.coffee.daili.api.query.DailiMerchantSkuQuery;
import com.coffee.daili.api.req.DailiMerchantSkuListReq;
import com.coffee.daili.service.bean.DailiMerchantSku;
import com.coffee.sku.api.sku.result.MerchantSkuListResult;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface DailiMerchantSkuDao {
	public DailiMerchantSku findById(Integer id);
	
	public DailiMerchantSku findByIdForUpdate(Integer id);
	
	public List<DailiMerchantSku> findByIds(@Param("idList") List<Integer> idList);

	public Integer count(@Param("param") DailiMerchantSkuQuery param);

	public List<DailiMerchantSku> page(@Param("param") DailiMerchantSkuQuery param, @Param("offset") Integer offset, @Param("rows") Integer rows);

	public DailiMerchantSku findFirst(@Param("param") DailiMerchantSkuQuery param);

	public Integer insert(DailiMerchantSku param);

	Integer insertBatch(List<DailiMerchantSku> list);

	public void updateById(@Param("param") DailiMerchantSku param);
	
	public Integer deleteById(Integer id);
	
	public Integer deleteBySkuIds(@Param("dailiMerchantId") Integer dailiMerchantId,@Param("list") List<Integer> idList);

	public List<Integer> findSkuIds(@Param("dailiMerchantId") Integer dailiMerchantId);

	public List<Integer> findIds(@Param("dailiMerchantId") Integer dailiMerchantId);

	public Integer dailiMerchantSkuCount(@Param("param")DailiMerchantSkuListReq req);

	public List<MerchantSkuListResult> getMerchantSkuListResultpage(@Param("param")DailiMerchantSkuListReq req, @Param("offset") Integer offset, @Param("rows") Integer rows);

}